package com.google.code.p.restrpc;

/**
 * @author dz
 */
public class DefaultRpcResponse implements RpcResponse {
    
    public static final DefaultRpcResponse SUCCEED_RESPONSE;
    
    static {
        SUCCEED_RESPONSE = new DefaultRpcResponse();
        SUCCEED_RESPONSE.setSucceed(true);
    }
    
    private Object result;
    
    private boolean succeed;
    
    private RpcFault fault;
    
    /**
     * @return the result
     */
    public Object getResult() {
        return result;
    }
    
    /**
     * @param result
     *            the result to set
     */
    public void setResult(Object result) {
        this.result = result;
    }
    
    /**
     * @return the succeed
     */
    public boolean isSucceed() {
        return succeed;
    }
    
    /**
     * @param succeed
     *            the succeed to set
     */
    public void setSucceed(boolean succeed) {
        this.succeed = succeed;
    }
    
    /**
     * @return the fault
     */
    public RpcFault getFault() {
        return fault;
    }
    
    /**
     * @param fault
     *            the fault to set
     */
    public void setFault(RpcFault fault) {
        this.fault = fault;
    }
    
}
